<?php

namespace Biz\Requests\Site;

use Biz\Constants\ApplicationConstants;
use Lumen\Validation\Rules\AttributeInRule;
use Lumen\Validation\Validators\RequestValidator;

/**
 * SitePaperThemeRequest.
 *
 * @license [http://www.85do.com] [杭州永奥网络科技有限公司]
 * @copyright Copyright (c) 2018-2026 Hangzhou Yongao Technology Co., Ltd. All rights reserved.
 */
class SitePaperThemeRequest extends RequestValidator
{
    /**
     * Get custom rules for validator errors.
     *
     * @return array
     */
    public function rules(): array
    {
        return [
            //'parent_id'                            => 'required|alpha_num|max:128',
            'translations'                         => 'required',
            'translations.*'                       => [
                'required',
                new AttributeInRule(ApplicationConstants::$Languages),
            ],
            'translations.*.name'               => 'required|max:255',
            'translations.*.description'             => 'max:255'
        ];
    }
}
